package com.zis.security.controller;

import com.zis.security.service.IAuthService;
import com.zis.starter.core.ResponseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 *
 * Create by wangshen 2018/5/3
 */
@RestController
@RequestMapping("/verify")
public class VerifyController {

    @Autowired
    private IAuthService authService;


    /**
     * 校验token
     * @param token
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/token/{token}", method = RequestMethod.GET)
    public ResponseEntity tokenVerify(@PathVariable("token") String token) throws Exception {
        return authService.tokenVerify(token);
    }

}
